package com.gxg.demo10.mydemo11;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.gxg.demo10.mydemo11.GiftSurfaceView.GiftSurfaceViewActivity;
import com.gxg.demo10.mydemo11.OverlayCardViewPager.OverlayCardViewPagerActivity;
import com.gxg.demo10.mydemo11.androidfilemanage.activity.MainFragmentActivity;
import com.gxg.demo10.mydemo11.dati.DaTiActivity;
import com.gxg.demo10.mydemo11.design.DesignTestActivity;
import com.gxg.demo10.mydemo11.floatview.A_Activity;
import com.gxg.demo10.mydemo11.gps.GpsStatusActivity;
import com.gxg.demo10.mydemo11.huaban.HuaBanActivity;
import com.gxg.demo10.mydemo11.jishi.customize.JiShiActivity;
import com.gxg.demo10.mydemo11.linechart.LineChartActivity;
import com.gxg.demo10.mydemo11.magicsurfaceview.MagicSurfaceViewActivity;
import com.gxg.demo10.mydemo11.magicsurfaceview.launch.LaunchActivity;
import com.gxg.demo10.mydemo11.scrollviewgroup.ScrollViewGroupActivity;
import com.gxg.demo10.mydemo11.stackbarchart.StackBarChartActivity;
import com.gxg.demo10.mydemo11.titletest.TitleTest2Activity;
import com.gxg.demo10.mydemo11.titletest.TitleTestActivity;
import com.gxg.demo10.mydemo11.vlayout.VlayoutDemoActivity;
import com.gxg.demo10.mydemo11.yueshu.YueShuBuJuActivity;
import com.gxg.demo10.mydemo11.zidingyi.ViewTestActivity;
import com.gxg.demo10.mydemo11.zuhetu.ZuHeChartActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @Bind(R.id.zhifubao)
    TextView zhifubao;
    @Bind(R.id.zhifubao1)
    TextView zhifubao1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);


        String data = getIntent().getStringExtra("data");
        if(!TextUtils.isEmpty(data)){
            Toast.makeText(this, ""+data, Toast.LENGTH_SHORT).show();
        }
    }

    @OnClick({R.id.tv_floatview,R.id.tv_rating,R.id.tv_jishi,R.id.tv_gps,R.id.tv_dati,R.id.tv_huabna,R.id.tv_fangqq,R.id.tv_Submitbutton,R.id.tv_android_magic_surface_view,R.id.tv_GiftSurfaceView,R.id.tv_OverlayCardViewPager,R.id.zuhetu,R.id.zhuzhuangtu,R.id.zhexiantu,R.id.DegisnTest,R.id.titleTest,R.id.titleTest2,R.id.zidingyi,R.id.yueshubuju,R.id.zhifubao, R.id.zhifubao1})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.zhifubao:
                startActivity(new Intent(MainActivity.this, ScrollViewGroupActivity.class));
                break;
            case R.id.zhifubao1:
                startActivity(new Intent(MainActivity.this, VlayoutDemoActivity.class));
                break;
            case R.id.yueshubuju:
                startActivity(new Intent(MainActivity.this, YueShuBuJuActivity.class));
                break;
            case R.id.zidingyi:
                startActivity(new Intent(MainActivity.this, ViewTestActivity.class));
                break;
            case R.id.titleTest:
                startActivity(new Intent(MainActivity.this, TitleTestActivity.class));
                break;
            case R.id.titleTest2:
                startActivity(new Intent(MainActivity.this, TitleTest2Activity.class));
                break;
            case R.id.DegisnTest:
                startActivity(new Intent(MainActivity.this, DesignTestActivity.class));
                break;
            case R.id.zhexiantu:
                startActivity(new Intent(MainActivity.this, LineChartActivity.class));
                break;
            case R.id.zhuzhuangtu:
                startActivity(new Intent(MainActivity.this, StackBarChartActivity.class));
                break;
            case R.id.zuhetu:
                startActivity(new Intent(MainActivity.this, ZuHeChartActivity.class));
                break;
            case R.id.tv_OverlayCardViewPager:
                startActivity(new Intent(MainActivity.this, OverlayCardViewPagerActivity.class));
                break;
            case R.id.tv_GiftSurfaceView:
                startActivity(new Intent(MainActivity.this, GiftSurfaceViewActivity.class));
                break;
            case R.id.tv_android_magic_surface_view:
                startActivity(new Intent(MainActivity.this, LaunchActivity.class));
                break;
            case R.id.tv_Submitbutton:
                startActivity(new Intent(MainActivity.this, SubmitbuttonviewActivity.class));
                break;
            case R.id.tv_fangqq:
                startActivity(new Intent(MainActivity.this, MainFragmentActivity.class));
                break;
            case R.id.tv_huabna:
                startActivity(new Intent(MainActivity.this, HuaBanActivity.class));
                break;
            case R.id.tv_dati:
                startActivity(new Intent(MainActivity.this, DaTiActivity.class));
                break;
            case R.id.tv_gps:
                startActivity(new Intent(MainActivity.this, GpsStatusActivity.class));
                break;
            case R.id.tv_jishi:
                startActivity(new Intent(MainActivity.this, JiShiActivity.class));
                break;
            case R.id.tv_rating:
                startActivity(new Intent(MainActivity.this, RatingActivity.class));
                break;
            case R.id.tv_floatview:
                startActivity(new Intent(MainActivity.this, A_Activity.class));
                break;
        }
    }
}
